<div class="clientes view">
<h2><?php  __('Cliente');?></h2>
	<table<?php $i = 0; $class = ' class="altrow"';?>
>
		</tr>			<td<?php if ($i % 2 == 0) echo $class;?>><?php __('Nm Cliente'); ?></td>
			<td<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $cliente['Cliente']['nm_cliente']; ?>
			&nbsp;
		</td>
		</tr>		</tr>			<td<?php if ($i % 2 == 0) echo $class;?>><?php __('RIF Cliente'); ?></td>
			<td<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $cliente['Cliente']['RIF_cliente']; ?>
			&nbsp;
		</td>
		</tr>		</tr>			<td<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></td>
			<td<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $cliente['Cliente']['id']; ?>
			&nbsp;
		</td>
		</tr>	</table>
</div>
<div class="actions">
	<h3><?php __('Acciones'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Editar Cliente', true), array('action' => 'edit', $cliente['Cliente']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Eliminar Cliente', true), array('action' => 'delete', $cliente['Cliente']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $cliente['Cliente']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Lista de Clientes', true), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Agregar Cliente', true), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('Lista de Gerencias', true), array('controller' => 'gerencias', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Lista de Contratos', true), array('controller' => 'contratos', 'action' => 'index')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Gerencias Relacionadas');?></h3>
	<?php if (!empty($cliente['Gerencia'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Nm Gerencia'); ?></th>
		<th><?php __('Cliente Id'); ?></th>
		<th><?php __('Id'); ?></th>
		<th class="actions"><?php __('Acciones');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($cliente['Gerencia'] as $gerencia):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $gerencia['nm_gerencia'];?></td>
			<td><?php echo $gerencia['cliente_id'];?></td>
			<td><?php echo $gerencia['id'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('Ver', true), array('controller' => 'gerencias', 'action' => 'view', $gerencia['id'])); ?>
				<?php echo $this->Html->link(__('Editar', true), array('controller' => 'gerencias', 'action' => 'edit', $gerencia['id'])); ?>
				<?php echo $this->Html->link(__('Eliminar', true), array('controller' => 'gerencias', 'action' => 'delete', $gerencia['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $gerencia['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('Nueva Gerencia', true), array('controller' => 'gerencias', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Contratos');?></h3>
	<?php if (!empty($cliente['Contrato'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Codigo'); ?></th>
		<th><?php __('Gerencia Id'); ?></th>
		<th><?php __('Cliente Id'); ?></th>
		<th class="actions"><?php __('Acciones');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($cliente['Contrato'] as $contrato):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $contrato['id'];?></td>
			<td><?php echo $contrato['codigo'];?></td>
			<td><?php echo $contrato['gerencia_id'];?></td>
			<td><?php echo $contrato['cliente_id'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('Ver', true), array('controller' => 'contratos', 'action' => 'view', $contrato['id'])); ?>
				<?php echo $this->Html->link(__('Editar', true), array('controller' => 'contratos', 'action' => 'edit', $contrato['id'])); ?>
				<?php echo $this->Html->link(__('Eliminar', true), array('controller' => 'contratos', 'action' => 'delete', $contrato['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $contrato['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('Nuevo Contrato', true), array('controller' => 'contratos', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
